home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / raytrace / rt800 / csg.scn < prev    next >
Text File  |  1992-07-26  |  1KB  |  57 lines

  1. % example to be traced with parameters like
  2. % w512 p2 A0.1 t1 I1 - good quality
  3. % or then
  4. % w512 p3 A.05 t1 I1 j1 - very good quality
  5.  
  6. %%%%% start
  7. eye 5 2 2
  8. fov 20
  9.  
  10. background light_sky_blue
  11. ambient mono 0.2 % dark grey
  12.  
  13. light point 3 5 4 white
  14.  
  15. surface matte red % default surface
  16.  
  17. %%%%% a simple CSG example
  18. csg subtraction begin
  19. % no attributes for this CSG, so it uses the attributes
  20. % of its nodes...
  21.  
  22.   % left node
  23.   csg subtraction
  24.     % attributes of this CSG object
  25.     surface matte white
  26.     texture scale 0.2
  27.     checkers surface matte mono 0.3 translate 0.1 0.1 0.1
  28.     data begin
  29.  
  30.     box 0 0 0 1 1 1
  31.  
  32.   csg next
  33.  
  34.     box 0 0 0 1.01 0.5 0.5
  35.     list begin
  36.       % a cylinder must be enclosed in a list, because it is
  37.       % not a closed object, but 3 objects joined together
  38.       cylinder 0 1.01 0 0 -1.01 0 0.5
  39.     list end
  40.  
  41.   csg end
  42.  
  43. csg next
  44.  
  45.   % right node
  46.   sphere 1 1 1 0.5 % default surface assumed
  47.   sphere 1 1 -1 0.5
  48.   sphere surface matte blue data 1 -1 1 0.5
  49.   sphere surface matte blue data 1 -1 -1 0.5
  50.  
  51. csg end
  52.  
  53. %%%%% some 3D text
  54. text3d file surface matte yellow data csg.t3d % data is in file
  55.  
  56. %%%%% end
  57.